package com.qz.c3;

import java.util.Scanner;

public class warehouse {
    public static void main(String[] args) {
        product HuaWei = new product("华为", 5.5, 3688.88, "8+128G 全面刘海屏");
        product XiaoMi = new product("小米", 5.0, 2988.88, "4+64G  全面屏");
        Scanner sc = new Scanner(System.in);
        System.out.println("品牌型号："+HuaWei.model+"\n"+"尺寸："+HuaWei.size+"\n"+"价格："+HuaWei.price+"\n"+"配置："+HuaWei.disposition);
        System.out.println("请输入华为手机的库存");
        int i = sc.nextInt();
        HuaWei.setCount(i);
        System.out.println("华为手机的总金额："+HuaWei.total);
        System.out.println("品牌型号："+XiaoMi.model+"\n"+"尺寸："+XiaoMi.size+"\n"+"价格："+XiaoMi.price+"\n"+"配置："+XiaoMi.disposition);
        System.out.println("请输入小米手机的库存");
        int j = sc.nextInt();
        System.out.println("小米手机的总金额："+XiaoMi.total);
        int n=i+j;
        XiaoMi.setCount(j);
        double sum=HuaWei.total+XiaoMi.total;
        System.out.println("------------------------库存清单------------------------");
        System.out.println("品牌"+"----"+"尺寸"+"--"+"价格"+"------"+"配置"+"------------"+"库存数量"+"--"+"总价"+"---");
        System.out.println(HuaWei.model+"\t"+HuaWei.size+"\t"+HuaWei.price+"\t"+HuaWei.disposition+"\t"+HuaWei.count+"\t\t"+HuaWei.total);
        System.out.println(XiaoMi.model+"\t"+XiaoMi.size+"\t"+XiaoMi.price+"\t"+XiaoMi.disposition+"\t\t"+XiaoMi.count+"\t\t"+XiaoMi.total);
        System.out.println("--------------------------------------------------------");
        System.out.println("总库存:"+n);
        System.out.println("库存总价"+sum+"￥");
    }

}
